import date from './date';
import Cookie from './cookie';
// import storage from "./storage";
import request from './request';
import app from './app';
import upload from '@/components/upload/index.vue';
import tableList from '@/components/tableList/index.vue';

export default {
  install(Vue) {
    // 全局注册date方法
    for (let i in date) {
      Vue.config.globalProperties['$' + i] = date[i];
    }
    // 全局注册cookie方法·
    for (let i in Cookie) {
      Vue.config.globalProperties['$' + i] = Cookie[i];
    }
    // 全局注册localStorage方法
    // for (let i in storage) {
    //  app.config.globalProperties["$" + i] = storage[i];
    // }
    // 全局注册request 方法
    Vue.config.globalProperties['$request'] = request;

    // 全局注册app对接方法
    Vue.config.globalProperties['$app'] = app;
    // Vue.config.globalProperties['$isIphoneX'] = isIphoneX;

    // 全局注册公用组件
    Vue.component('PHUPLOAD', upload);
    Vue.component('PHTABLELIST', tableList);
  },
};
